package com.yundasys.lab12java.java8;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * @PACKAGE_NAME: com.yundasys.lab12java.java8
 * @NAME: Main
 * @USER: jiangta
 * @DATE: 2021/7/27
 * @TIME: 8:32 上午
 * @PROJECT_NAME: springboot-labs
 */
public class Main {

    public static void main(String[] args) {

        Formula formula = new Formula() {
            @Override
            public double calculate(int a) {
                return sqrt(a*100);
            }
        };
        System.out.println(formula.calculate(100));
        System.out.println(formula.sqrt(16));

        List<String> names = Arrays.asList("peter", "anna", "mike", "xenia");
        Collections.sort(names,(a,b) -> a.compareTo(b));
        System.out.println(names);

        System.out.println(42 == 42.0);



    }
}
